package com.huatai.bi.handler.dataSet;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huatai.bi.dto.DataSetCreateDto;
import com.huatai.bi.entity.*;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
public abstract class DataSet {

    public abstract List<DataSetColumnEntity> column(DirectDataSetEntity dataSet);
    public abstract void create(DataSetCreateDto dto);

    //数据集预览数据
    public List<Object> previewData(DataSetCreateDto dto){return null;}
    //根据数据集ID预览数据
    public List<Object> previewData(DirectDataSetEntity dataSet,Integer pageIndex,Integer pageSize){return null;}

    //数据集列表-直连
    public List<Object> list(DirectDataSetEntity dataSet){return new ArrayList<>();}

    //数据集分页-直连
    public IPage page(DirectDataSetEntity dataSet, Integer pageIndex, Integer pageSize){return new Page();}
}
